package com.wn.budget.model;

import com.wn.budget.code.BaseEntity;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import java.util.Date;

@Data
@Entity
public class Project extends BaseEntity {
    /**
     * 管理员id
     */
    @Column(length = 36)
    public String adminId;
    /// <summary>
    /// 客户姓名，单位
    /// </summary>
    @Column(length = 100)
    public String customerName;

    /// <summary>
    /// 客户联系方式
    /// </summary>
    @Column(length = 100)
    public String contact;

    /// <summary>
    /// 工程详细地址
    /// </summary>
    @Column(length = 200)
    public String address;

    /// <summary>
    /// 面积
    /// </summary>
    public double area;

    /// <summary>
    /// 施工日期 开始日期
    /// </summary>
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    public Date startWork;

    /// <summary>
    /// 施工工期 持续多少天
    /// </summary>
    public int period;

    /// <summary>
    /// 费率项目
    /// </summary>
    @Column(length = 100)
    public String rateName;

    /// <summary>
    /// 费率值
    /// </summary>
    public double rate;

    /// <summary>
    /// 备注说明
    /// </summary>
    @Column(length = 200)
    public String rateRemark;

    /**
     * 模板id
     */
    @Column(length = 36)
    public String templateId;
}
